CacheSentry for Internet Explorer

By EnigmaticSoftware

Current Version: 1.50, Build 136
File Size: 57,344 bytes
Requirements: Windows 95, 98, 98SE, ME, NT or Win2K, and Internet Explorer 3.0 or greater.
Author: David M. Pochron

New odd behavior found in Outlook Express 5.x! See the Stray file bug section for the details.

CONTENTS
OVERVIEW

This is a program that fixes serious bugs in the Internet Explorer cache manager (versions 3.0 on up through and including Internet Explorer for Windows ME, and IE5.5 SP1). This program basically takes over the job of managing the cache from Internet Explorer, and the result is your web browsing session will be more enjoyable. CacheSentry isn't like those "web accelleration" programs that hook into IE and attempt to make guesses about your browsing habits. CacheSentry simply does a better job of removing files from the cache, and fixes a few other bugs present in most versions of Internet Explorer.

The list of Internet Explorer bugs CacheSentry fixes: (Click on each link for the details)

In addition to fixing bugs, CacheSentry also reports some useful information to you, such as the true location of your cache folder, the current amount of space your cached files are using, and the cache update frequency setting of Internet Explorer. The latest versions of CacheSentry also remove Cookie files that haven't been used for months.

INSTALLATION

CacheSentry comes in a .ZIP package. You can use any unzipping utility for Windows to unpack the files to a directory of your choice. Make sure CACHESENTRY.EXE and FIXINDEX.EXE are in the same directory together. You can place the documention files anywhere you wish, or don't unpack them at all if you feel you don't needs the docs.

There is no "Install" program, since there isn't anything really to install! CacheSentry:

You simply run the CacheSentry executable (program) and it will do its thing. There are a few things you must do first in order to have it function properly:

  1. You must set Internet Explorer's cache size to the maximum allowed. The reason for doing this is to make sure Internet Explorer never gets a chance to make room in the cache on its own. Setting the cache to a huge size will accomplish this, since CacheSentry will manage the cache before it ever reaches that size. If you don't know how to set Internet Explorer's cache size, click here.
  2. It is convenient to have CacheSentry automatically start up when you turn on your computer. To do this, you should add CacheSentry to the "Programs / Startup" menu on the Desktop. If you don't know how to do this, click here.
  3. Cool Tip: If you don't wish to have CacheSentry run automatically at startup and you use Internet Explorer 4 or higher, you can place a shortcut to CacheSentry in IE's "Links" toolbar! Simply start IE, then open the folder on your hard drive you have installed CacheSentry to and drag the program icon to IE's "Links" toolbar. Then, whenever you want to start CacheSentry, simply click the link! If CacheSentry is already running, clicking on the link has the added benefit of bringing up the CacheSentry prefs window for you, so you don't have to have its icon sitting in the system tray if you don't want to anymore.

Since CacheSentry is a very small program (approx. 48K) and doesn't use anything else but the system .DLL's, leaving it running even when you're not browsing will not affect you computer's performance. In fact, CacheSentry "sleeps" until you actually start browsing with Internet Explorer on the web! (It uses no CPU cycles when it's not needed.) Once you finish using Internet Explorer, it goes back to sleep.

Once CacheSentry is installed and running, you will see a little icon appear in the tray area of the desktop taskbar. This icon lets you know CacheSentry is running and gives you access to its options window.

Using CacheSentry

With CacheSentry running, your Internet cache is automatically being managed. You can change the settings of CacheSentry by double-left-clicking or single-right-clicking with the mouse on its little icon in the taskbar.

You will then be presented with the CacheSentry properties window. By default, CacheSentry sets the cache size to whatever amount of space the cache is currently using. So if you have 10 megabytes of files currently in the cache, it considers 10 megabytes to be a full cache. If there are 100 megabytes of files in your cache, then 100 megabytes will be the set size of the cache. You can adjust this default to other sizes you like if you wish. Note that it will not allow the cache to be set larger than 300 megabytes.

All settings you use with CacheSentry will be remembered for the next time the program is run.

Click here to see a description of the CacheSentry Properties window.

Informational Displays
In the Current cache size display line, CacheSentry not only displays the current size of the cache in bytes, but also in megabytes. Remember, a megabyte is equal to 1,048,576 bytes (not 1,000,000 bytes), so the value here may seem lower than the actual byte value. This displayed value should give you a better idea of how close to the maximum size the cache is getting.

The Activity Log
The activity log reports all actions performed by the CacheSentry cache manager, along with certain error messages. Note that it does not display miscellaneous cache activity - this is not CacheSentry's purpose. That functionality is the purpose of our other utility,
CacheMonitor. Note that you will not see any deletions logged until the cache fills up and CacheSentry needs to make more room. This may take quite a while if you have set the cache to a large maximum size and it is empty or near empty. If you wish, you can clear the contents of the activity log by clicking the "Clear Activity Log" button. Version 1.44 and up of CacheSentry also allows you to save the contents of the Activity Window to a text file. This is to help with technical support questions. It is always saved to a file named "Activity.txt", and is saved in whatever current directory CacheSentry is set to run in. If you have trouble locating where the file was saved, use the Windows "Find" command on the Desktop Start Menu.

As of version 1.1, CacheSentry places a "startup code" number in the log. If you submit tech support questions, please give us your startup code value so we may expedite a solution to your problem. (Make sure you copy the value exactly as it is shown!)

As of version 1.4, CacheSentry removes stray files and URL's. (See the Overview section for details on this.) The amount of wasted space and URL's reclaimed is displayed in the activity log. The check and removal of stray files and URL's is only done once when CacheSentry starts up. If you want CacheSentry to check this again, you will need to exit and restart CacheSentry.

Activity Icons
CacheSentry lets you know what it's doing while it's sitting up there in the system tray. Here is a list of icons and their meanings:

Waiting CacheSentry is awake but is waiting (idle) for its next crack at checking on and/or managing the cache.
Sleeping CacheSentry has gone to sleep because you aren't web browsing or haven't clicked on any links for a while in the web browser.
Working CacheSentry is scanning, managing, and/or removing the oldest files from the cache. This icon appears only briefly because it doesn't take long for CacheSentry to do its work - it's a very CPU-friendly program!

If you hold the mouse pointer over the activity icon in the task bar tray, it will tell you the sum of the size of all the files in the cache. Very handy way of quickly seeing how large your cache has grown.

Immediate Mode
CacheSentry has an alternate mode it can run in - Immediate Mode. With this mode, CacheSentry exits after checking to see if the Cache is larger than the user-specified size and doing any necessary deletions. There is no user interface nor any system tray icon display with this mode - it quietly starts up, does its job, and leaves.

To access this mode, add the -i command line switch when starting CacheSentry, like this:

CacheSentry.exe -i

You would do this in either a shortcut (say, the Programs -> Startup folder in the Start Menu) or in a scheduling program like System Agent. (Which comes with the Windows 95 Plus pack and Windows 98.)

The idea behind this mode is to give users the ability to control when CacheSentry does its management tasks, and not take up any memory at all when it isn't needed. For instance, let's say you have a large hard drive with space to spare and you regularly log on or restart your computer fairly often. Let's also say you have plenty of spare space available for the cache on your hard drive. You could create a shortcut to CacheSentry (or edit the existing one) in the Startup folder (as described in the INSTALLATION section) with the -i switch added. Then, whenever you restart your computer or log on as a new user, CacheSentry would be run and would do any management at just those times, bringing the cache back down to a reasonable size from the previous session of web browsing and cleaning up stray files.

Alternatively, if you do use a program like System Agent, you could put CacheSentry into its schedule to clean the cache up hourly, daily, weekly, or whatever you feel like.

Since CacheSentry has no interface in Immediate Mode, simply run CacheSentry in regular mode (i.e., without the -i switch) to set the cache size, then exit it.

If CacheSentry is already running in regular mode, it won't run in Immediate Mode - the new immediate instance of the program will just exit without doing anything. (The previous instance of CacheSentry in regular mode will be unaffected.)

Kiosk Mode
CacheSentry can be run in a "kiosk mode." The only difference between kiosk mode and normal mode is in kiosk mode, no error dialogs appear. Instead, errors messages are quietly inserted into the activity log. To activate kiosk mode, specify the -k switch when invoking CacheSentry from the Explorer Run menu item, command line prompt, or a shortcut. Example:

CacheSentry.exe -k

SPECIAL NOTES
INTERNET EXPLORER 5.x

Many users have been wondering whether CacheSentry is still needed with IE5. The short answer? Yes, at least as a repair tool used on occasion. IE5 still has the stray file problem to an extent (it eventually deletes some of the strays, but for some reason others never seem to get deleted) so you'll still want to run CacheSentry from time to time just to keep the cache clean. As for it removing the wrong files when the cache fills up - they changed something, but it still uses a poor decision method. Here are some basic rules you can use to decide whether to continue using CacheSentry all the time or not:

In any case, IE5 does do a better job of not deleting subscribed content. I wish it made better choices about which files to delete, however. (It could be a lot better!) The stray files are still a problem, though when you tell IE5 to delete all the files in the cache, it really does delete all the files, including the strays.

With the newly found bug regard how large IE thinks the cache is, it is necessary once again to run CacheSentry at least on a semi-regular basis to make sure you are getting full use out of the space you have allocated to the Internet cache.

IE 5.5 and 5.5 SP1

If you don't want the files Outlook Express is generating in the cache to stay around, you can run CacheSentry to clean them out for you. Because IE 5.5 seems to delete files even more randomly than IE 5 and 5.01 did, you might want to run CacheSentry while browsing if you want normal Internet content to be available in the cache for a longer period of time. IE 5.5 appears to have the same INDEX.DAT bug found in IE 4 and 5.0/5.01. Over time, the size IE thinks the cache is slowly gets out of sync with what the sum total size of all the content (including strays) actually is.

FREQUENTLY ASKED QUESTIONS (FAQ)

Q: If I set Internet Explorer's cache to 100%, won't that use up all my hard drive space?
A: No. Setting it that way only tells how much space it can use, not how much it will use. Since you will have set CacheSentry's size to a much smaller value, the cache will never grow that large. This setting of IE's cache size to the largest it will go is how CacheSentry maintains control of the cache - IE doesn't get a chance to make room in the cache (and make random deletions in the process.) I cannot stress this point enough - make sure you set IE's cache size as large as possible, and make sure there is a large difference between it and CacheSentry's cache size.

Q: I want to set the CacheSentry cache size to larger than 300MB. Can I do it?
A: No. Setting the cache to a very large size and leaving all that content in there will slow down your browser. Personally, I recommend not caching more than 100MB of web content, but I allow three times that amount for users who really want a large cache. Internet Explorer's cache storage mechanism can only hold around 80,000 to 127,000 files. If too many files are in the cache, the cache will go crazy and IE will likely reset the cache to an empty state and you will lose all your cached files.

Q: I'm seeing my cache suddenly drop in size from time to time. Is something wrong?
A: Probably not. CacheSentry holds off on deleting large files for at least 24 hours. This is done to prevent accidental erasure of these files in case it is a failed download. (Internet Explorer 4 and up can resume downloads in some cases.)

Q: Okay, I'm seeing the above drop as described above and I'm also seeing CacheMonitor II report deletions from all over the cache, instead of all the oldest files grouped together. Is there a problem?
A: Maybe. First make sure you are sorting the cache entries in CacheMonitor II by "Last Access Time". If the random deletions consist of downloaded programs (files with .EXE or .ZIP extensions) or media files (.WAVs, .MP3's, .MOV's, etc.) then that is normal - CacheSentry gets rid of these files first since they are eating up most of the space in the cache and it is less likely you will need them in the cache. If however the bad deletions consist of regular web content (HTML files, GIF's, and JPG's) then it is likely Internet Explorer is still mis-managing the cache. Try setting IE's cache size to 100%, try setting CacheSentry's cache size to a smaller value, or try setting a larger cluster size for the cache in the settings window.

Q: How come CacheSentry isn't reporting any deletions? Why isn't it reporting additions to the cache?
A: The answer to the second part first: CacheSentry is not CacheMonitor - CacheSentry does not monitor changes in the cache. It only uses the activity window for things it does on the cache itself. As to the first question, CacheSentry only starts removing files once the cache fills to the limit you have set in the CacheSentry settings window. It also only checks for stray files when it starts up. The rest of the time it will sit quietly until it is either restarted or the cache reaches your set limit.

Q: What's this "cluster size" thing for? How do I set it correctly?
A: Most Windows filing systems break files up into units called "clusters". The cluster size determines the granularity of files stored on the drive. For example, If your volume's cluster size is 4096 bytes, then even a 1 byte file takes up at least 4096 bytes. A 4097 byte file would take up 8192 bytes, because it would require two clusters to store the file. CacheSentry 1.2 and higher uses the cluster size to better calculate the true size of the cache, which turn will prevent the cache from growing too large and risking IE regaining control of it. You can get the cluster size of your cache by opening a DOS window and going to the volume that contains the cache directory. type CHKDSK and the value next to the "bytes in each allocation unit" is the cluster size. Set CacheSentry's cluster size to this value for optimal performance of CacheSentry. (Exception: If the cache is in a compressed volume or folder, you should probably set the cluster size to "None".)

Q: Does setting the cluster size in CacheSentry change the cluster size of the cache?
A: No. CacheSentry only uses this value for it's own needs in determining the true size of the cache, and for correcting IE's cache size miscalcuation bug.

Q: Since upgrading from 1.1 or earlier version, my cache size has jumped up enormously. I want CacheSentry to size the cache like it did before. Can this be done?
A: Yes. Set the cluster size to "None". See the
Special Notes section above regarding this setting and using the new cache size bug fix.

Q: Why doesn't CacheSentry doesn't figure out the cluster size on its own?
A: Because the programmers at Microsoft forgot to include an OS call that accurately reports the cluster size. The cluster size varies on which OS you're using, which version, which filesystem, and whether the volume is compressed or not. All these variables make checking the cluster size difficult on a multi-platform utility such as this. Eventually, CacheSentry will determine the cluster size for you once I resolve the issues of determining the above cases.

Q: What happened to the cache update setting display?
A: Microsoft kept changing the location in the registry of that Internet Explorer setting amongst the different versions of IE5, and I became tired of trying to chase the setting down. That feature was added to CacheSentry mostly for the benefit of IE4 users who noted IE4 didn't always remember the update setting. Since I haven't seen any reports of the same problem with IE5 so it appears to be fixed so displaying the setting is no longer as useful. Plus, I needed the screen space to put the cookie removal option into the CacheSentry settings window.

Q: CacheSentry says the cache is zero bytes in size, but when I do a folder properties on the cache directory in Windows it shows it's not empty. Why is there a discrepancy?
A: CacheSentry doesn't include the index files that are used by IE to keep track of the cached files. (In other words, the discrepancy is overhead used by the cache.)

Q: How do I upgrade to the latest version of CacheSentry?
A: Simply download the latest version, then unpack/unzip the executable programs over the old copies, and that's it! You can check to make sure you are running the latest version by clicking the "About" button in the CacheSentry settings window.

Q: How do I uninstall CacheSentry?
A: Since CacheSentry doesn't "hook" into Windows, if you simply don't run it, it is effectively uninstalled and cannot have any effect on the system. If you have set CacheSentry up to automatically run at startup, simply remove the shortcut from the Windows Startup folder. You can optionally delete the CacheSentry executable from your system if you wish for a complete uninstall. If you really want to clean it out of your system, you can also remove the pair of registry entries CacheSentry generates for storing its settings in the HKEY_LOCAL_MACHINE/Software/EnigmaticSoftware entry and HKEY_CURRENT_USER/Software/EnigmaticSoftware entry. Only attempt to remove these if you know how to use the registry editor.

Q: I've just upgraded to CacheSentry 1.50, and now it is telling me it cannot find the FIXINDEX.EXE program. What happened?
A: Because of compatibility issues between Win 9x and Win NT/2000, I had to change how CacheSentry determines which folder it is in. If you start CacheSentry from a shortcut (such as from anywhere in the Start Menu or from the Links line in IE) you will need to update this shortcut if you are experiencing this problem. Open the shortcut's properties, and look at the "Start In" field. Make sure the path points to the actual directory CacheSentry.exe and FIXINDEX.EXE is located in, otherwise you will continue to see the error message regarding FIXINDEX.EXE.

 

Click here to see the version history